package com.mq.retry;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * 死信队列
 * @author ytj
 * @date 2024/1/16
 */
@Component
@RabbitListener(queues = Demo7Message.DEAD_QUEUE)
public class Demo7DeadConsumer {

    @RabbitHandler
    public void message(Demo7Message demo7Message){
        System.out.println("死信队列获取消息:"+demo7Message.getId());
    }
}
